#include "selectServer.hpp"


int main(int argc, char *argv[])
{
    
    LogModule::ENABLE_CONSOLE_LOG();

    if (argc < 2)
    {
        LogModule::LOG(LogModule::LogLevel::ERROR) << "参数错误";
        return -1;
    }
    ENABLE_CONSOLE_LOG();
    u_int16_t port = std::stoi(argv[1]);
    
    std::unique_ptr<selectServer> ssvr =
        std::make_unique<selectServer>(port);
    ssvr->init();
    ssvr->loop();
    return 0;
}

// using std::endl, std::cin, std::string, std::cout;

// int main()
// {
//     fd_set fds;
//     cout << "fds: " << sizeof(fds) * 8 << endl;
//     return 0;
// }